package vip.xiaonuo.megvii.captures.model.base.define;

import java.util.HashMap;
import java.util.Map;

public class VehicleDefine {

    private static Map<Integer,String> colorMap = new HashMap<>();

    static {
        colorMap.put(0x1FFF,"未知颜色");
        colorMap.put(0x2000,"黑色");
        colorMap.put(0x2001,"白色");
        colorMap.put(0x2002,"深灰");
        colorMap.put(0x2003,"棕色");
        colorMap.put(0x2004,"红色");
        colorMap.put(0x2005,"蓝色");
        colorMap.put(0x2006,"黄色");
        colorMap.put(0x2007,"绿色");
        colorMap.put(0x2008,"花色");
        colorMap.put(0x2009,"银灰色");
        colorMap.put(0x200A,"橙色");
        colorMap.put(0x200B,"青色");
        colorMap.put(0x200C,"粉色");
        colorMap.put(0x200D,"紫色");
        colorMap.put(0x200E,"香槟色");
    }

    public static String getColorDesc(Integer color){
        if(!colorMap.containsKey(color)){
            color = 0x1FFF;
        }
        return colorMap.get(color);
    }


    private static Map<Integer,String> directionMap = new HashMap<>();
    // 0-未知，1-上，2-下，3-左，4-右，5-左上，6-左下，7-右上，8-右下
    static {
        directionMap.put(0,"未知");
        directionMap.put(1,"上");
        directionMap.put(2,"下");
        directionMap.put(3,"左");
        directionMap.put(4,"右");
        directionMap.put(5,"左上");
        directionMap.put(6,"左下");
        directionMap.put(7,"右上");
        directionMap.put(8,"右下");

    }

    public static String getDirectionDesc(Integer direction){
        if(!directionMap.containsKey(direction)){
            direction = 0;
        }
        return directionMap.get(direction);
    }

}
